package com.magold.physics.magnetic;

import org.andengine.util.color.Color;

public enum MagneticPole {
	RED_POLE('N', Color.RED), BLUE_POLE('S', Color.BLUE);

	public final char FLAG;
	public final Color COLOR;
	private MagneticPole(char pChar, Color pColor) {
		FLAG = pChar;
		COLOR = pColor;
	}
	
	public MagneticPole negative() {
		switch (FLAG) {
		case 'N' : return BLUE_POLE;
		case 'S' : return RED_POLE;
		}
		return null;
	}
	
	public static MagneticPole forFlag(char ch) {
		switch (ch) {
		case 'N' : return RED_POLE;
		case 'S' : return BLUE_POLE;
		}
		return null;
	}
}
